
<#include "/common/head.html"/>

 <div class="easyui-panel updatePage" data-options="fit:true,border:false">
    <form id="ff" class="easyui-form" method="post">
        <table class="table1">
        	
            <tr>
           		<th><span>用户名：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="user_name" value="${model.user_name!''}" data-options=""></input>
           		</td>
           	</tr>
           <!--  <tr>	
           		<th><span>密码：</span></th>
               	<td>
               		<input class="easyui-textbox" type="password" name="password" value="${model.password!''}" data-options=""></input>
           		</td>
           		
            </tr> -->
            <tr>
           		<th><span>角色：</span></th>
               	<td>
               		<input id="roles" name="roles" class="easyui-combobox" value="${model.roles!''}" data-options="
               				
               				valueField: 'id',
        					textField: 'text',
        					data:[
        						{id:'', text:''}<#list dictDataroles.keySet() as key>,{id:'${key}', text:'${dictDataroles.get(key)}'}</#list>
	               			]
               		"/>
           		</td>
           	</tr>
            <tr>
           		<th><span>创建时间：</span></th>
               	<td>
               		<span class="item">${model.create_time!''}</span>	
           		</td>
           		
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
function save() {
	if($("#zcurdHeadTable").form('validate')) {
		$.post("update", getParam(), function(data) {			
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
			
		});
	}
}
function getParam() {
	var param = {
	     
	    "id": ${model.id}, 
       	    "model.user_name": getInputValue("user_name"),        	   
       	    "model.roles": getInputValue("roles")
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
$(function() {
  changeComboboxToMult("roles");
});;
</script>
<#include "/common/foot.html"/>
